package com.xiyi.shouxin.view.pojo;

import com.xiyi.shouxin.entity.user.Cpr;

import lombok.Getter;

@Getter
public class CprView extends Cpr {
private Integer type;
    public CprView(Cpr cpr) {
        this.type=0;
        if (cpr != null) {
            this.setId(cpr.getId());
            this.setUid(cpr.getUid());
            this.setDepth(cpr.getDepth());
            this.setQualified(cpr.getQualified());
            this.setTime(cpr.getTime());
            this.setCreatedAt(cpr.getCreatedAt());
            this.setMillisecond(cpr.getMillisecond());
            if(this.getTime()<496){
                this.type=1;
            }
            if(this.getTime()>600){
                this.type=2;
            }
        }
    }
}
